// 导入：类型、接口、模块、组件、样式
import { Component } from "react";

import Login from "./pages/login"; // pages/login.tsx   pages/login/index.tsx
import Home from "./pages/home"; // pages/index.tsx   pages/index/index.tsx

import "./styles/reset.scss";

class Index extends Component {
  render() {
    // 模拟路由
    const path = window.location.href.split("/").pop();
    // 返回数据
    return (
      <>
        {path === "" && <Home />}
        {path === "login" && <Login />}
      </>
    );
  }
}
export default Index;
